//! Lodash-inspired helper collection available throughout the `price-rs` workspace.
//! 为 `price-rs` 提供 Lodash 风格的常用工具，聚焦在日常数据处理中常用的辅助函数。

pub mod collection;
pub mod expression;
pub mod functional;
pub mod number;
pub mod string;

// Re-export popular utility crates so downstream modules can use them via `price_utils`.
// 重新导出常用三方依赖，方便在业务侧通过 `price_utils` 统一引用。
pub use itertools;
pub use petgraph;
pub use rust_decimal;

/// Convenient re-export of the most commonly used helpers.
/// 方便一次性引入最常用的辅助函数。
pub mod prelude {
    pub use crate::collection::{chunk, compact, difference, flatten, group_by, intersection, partition, uniq, zip_to_map};
    pub use crate::expression::{
        CompiledExpression, CompiledPredicate, CustomFunctionRegistry, ExpressionError, ExpressionResult, VariableType, clear_custom_functions, eval,
        eval_bool, eval_bool_with_state, eval_predicate, eval_variable, eval_variable_with_state, eval_with_state, list_custom_functions,
    };
    pub use crate::functional::{attempt, tap, thru, times};
    pub use crate::number::{
        clamp, decimal_ceil, decimal_floor, decimal_round, decimal_round_with_strategy, decimal_sum, decimal_truncate, in_range, mean, median, mode,
        parse_decimal, parse_float, parse_int, range, sum, sum_by,
    };
    pub use crate::string::{camel_case, capitalize, kebab_case, snake_case, start_case, truncate, words};
}
